package com.hongpu.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.hongpu.domain.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hongpu.utils.ResultDto;
import com.hongpu.vo.SysRoleVo;

import java.util.List;

/**
* @author Michael zhang
* @description 针对表【sys_user_role(用户角色表)】的数据库操作Mapper
* @createDate 2025-06-04 09:00:05
* @Entity generator.domain.SysUserRole
*/
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
    /**
     * 根据用户ID和角色ID删除该用户的角色
     */
    public boolean deleteRoleByUserId(SysUserRole sysUserRole);
    /**
     * 根据用户ID查询角色ID
     */
    @InterceptorIgnore(tenantLine = "true")
    public List<SysRoleVo> getRoleIdsByUserId(Long userId);

    /**
     * 根据用户ID删除所有角色ID
     */
    public boolean deleteRoleIdsByUserId(Long userId);
}




